#!/usr/bin/env python
#coding=utf-8 


# def add(x, y): return x+y
# lambda x, y: x + y

# reduce 折叠
# map
# filter 这两个差不多


# 偏函数应用
from functools import partial
import Tkinter

root = Tkinter.Tk()
MyButton = partial(Tkinter.Button, root,
	fg='white', bg='blue')
b1 = MyButton(text="Button 1") # 直接在原基础上增加
b2 = MyButton(text="Button 2")
qb = MyButton(text='QUIT', bg='red', command=root.quit)
b1.pack()
b2.pack()
qb.pack(fill=Tkinter.X, expand=True)
root.title('PFAs')
root.mainloop()